#ifndef _LINE_ENTITY_H_
#define _LINE_ENTITY_H_

#include "engine.h"
#include "opengl/opengl_buffer.h"
#include "entity/entity.h"

namespace engine
{
    class LineEntity : public Entity
    {
    public:
        LineEntity(float start_x, float start_y, float end_x, float end_y)
        {
            this->primitiveType = GL_LINES;
            float vertices[] = {start_x, start_y, 0.0f,
                                end_x, end_y, 0.0f};
            this->vertexArray->addVertexBuffer(new VertexBuffer(vertices, sizeof(vertices)), 0, 3);
        }
        virtual ~LineEntity() {}

        void drawVertex()
        {
            vertexArray->bind();
            glDrawArrays(this->primitiveType, 0, 2);
        }

    private:
    };
}
#endif